/*
 * xds.h
 *
 */

/// XDS: Text based Diagnostic Services
#ifndef INC_XDS_H_
#define INC_XDS_H_

#include "xds_cfg.h"

typedef void(*Xds_MainFunc_T)(int,char**);

typedef struct
{
	const char * key;
	Xds_MainFunc_T main;
	const char * desc;
}
Xds_ItemDesc_T;

extern const Xds_ItemDesc_T Xds_ItemDesc[XDS_ITEM_TOTAL_NUMBERS];

extern void xds_Init(void);

extern void xds_Task1ms25(void);
extern void xds_Task20ms(void);

typedef enum
{
	XDS_LEVEL_ALWAYS = 0,
	XDS_LEVEL_DEBUG,
	XDS_LEVEL_ERROR,
	XDS_LEVEL_WARNING,
	XDS_LEVEL_INFO,

	XDS_LEVEL_TOTAL_NUMBERS
}
XDS_LEVEL;

extern int xds_printf(XDS_USER user, XDS_LEVEL level, const char * format, ...);
extern int xds_printfNoHeader(XDS_USER user, XDS_LEVEL level, const char * format, ...);

#endif /* INC_XDS_H_ */
